home *** CD-ROM | disk | FTP | other *** search
- -- background: 2653 from stack: in
- -- bmap block id: 2389
- -- flags: 0000
- -- background id: 0
- -- name:
- ----- HyperTalk script -----
- on mouseUp
- if mouseH() < 20 and mouseV() < 20 then
- show menuBar
- exit mouseUp
- else
- hide menuBar
- end if
- cleanScreen
- if name of target contains "card button" then
- if shiftKey() is down then
- get checkMod()
- if it is "OK" then exit mouseUp
- answer "Remove this volume from the library?" with "Yes" or "No"
- if it is "No" then
- end if
- if it is "Yes" then
- if short name of target is in "Desktop,Home,the stack you want" then
- beep
- answer "“Desktop”, “Home”, and “StackFinder” are chained to" &" the bookshelf and can't be removed."
- exit mouseUp
- end if
- set name of target to "?"
- get rect of target
- put item 1 of it & "," &item 2 of it into temp
- put item 3 of it & "," &item 4 of it into temp2
- choose select tool
- drag from temp to temp2
- doMenu "Clear Picture"
- choose browse tool
- end if
- exit mouseUp
- end if
- if short name of target is "?" then
- get checkMod ()
- if it is "OK" then exit mouseUp
- answer "This book needs a title." with "Entitle it..." or "Cancel."
- if it is "Entitle it..." then
- set cursor to 3
- put line 1 of CustomFileName("STAK","Please choose a title for this book:") into FName
- lock screen
- unlock screen
- if FName is not empty then
- set cursor to 3
- repeat with i = length of FName down to 1
- if char i of Fname is not ":" then
- put char i of fname before FNameTemp
- else
- exit repeat
- end if
- end repeat
- else
- exit mouseUp
- end if
- lock screen
- show cd fld 1
- set name of target to FNameTemp
- put FNameTemp into cd fld 1
- select line 1 of cd fld 1
- doMenu "Copy Text"
- hide cd fld 1
- choose select tool
- set textSize to 9 -- can't be much larger
- set textFont to geneva -- font of the title
- set textStyle to plain -- style of the title
- doMenu "Paste Text"
- doMenu "Rotate Right"
- doMenu "Transparent"
- get loc of target
- drag from 254,169 to it
- show tool window at 439,33
- exit mouseUp
- else
- exit mouseUp
- end if
- end if
- set cursor to 3
- if short name of target is "Home" then
- GoHome
- else
- if short name of target is "DeskTop" then
- answer "Quit HyperCard?" with "Yes" or "No"
- if it is "Yes" then
- doMenu "Quit HyperCard"
- else
- exit mouseUp
- end if
- else
- if short name of target is "AddButton" then
- AddButton
- else
- if short name of target is not "the stack you want" then
- get short name of target
- visual zoom open
- do "go stack " &it
- if result() is empty then
- else
- beep
- answer "There is no stack with that name currently on line." &" The book you clicked on might be mis-named. Please " &"rename it and try again."
- lock screen
- unlock screen with zoom close
- end if
- exit mouseUp
- else
- get short name of target
- visual zoom open
- do "go stack " &it
- if result() is empty then
- else
- beep
- answer "You clicked on the cancel button."
- lock screen
- unlock screen with zoom close
- end if
- exit mouseUp
- end if
- end if
- end if
- end if
- else
- pass mouseUp
- end if
- end mouseUp
-
- function checkMod
- if cantmodify of this stack is true then
- beep
- answer "Can't modify this stack." &return &"Select Protect Stack from the File menu and" &return &"unprotect it or move stack to unlocked disk."
- show menuBar
- return it
- end if
- end checkMod
-
- on arrowKey
- end arrowKey
-